#include <stdio.h>
#include <stdlib.h>

void inv(int  *x, int n)
{   int t,*p,*i,*j,m=(n-1)/2;
    i=x;  j=x+n-1;  p=x+m;
    for(;i<=p;i++,j--)
    {  t=*i;  *i=*j;  *j=t; }
}
main()
{  int i,a[10]={3,7,9,11,0,6,7,5,4,2};
     inv(a,10);
    printf("The array has been reverted:\n");
    for(i=0;i<10;i++)
       printf("%d,",a[i]);
    printf("\n");
  //  getch();
}

